package org.example.Thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:Lenovo
 * Date:2022-03-21
 * Time:10:52
 */
class MyThread2 extends java.lang.Thread {
    @Override
    public void run() {
        while (true){
            System.out.println("hello thread!");
            try {
                java.lang.Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
public class Deno2 {
    public static void main(String[] args) {
        java.lang.Thread a = new MyThread2();
        a.start();

        while (true){
            System.out.println("hello 朱意芃!");
            try {
                java.lang.Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
